<template>
  <div>
    <h1>当前页面：{{ currentPath }}</h1>
    <p>从 {{ previousPath }} 页面到了当前页面</p>
  </div>
</template>

<script setup>
import { computed } from "vue";
import { usePageStore } from "@/stores/pageStore";

const pageStore = usePageStore();

// 使用 computed 属性来访问 Pinia store 中的状态
const currentPath = computed(() => pageStore.currentPath);
const previousPath = computed(() => pageStore.previousPath);
</script>
